//==========================================================================
// Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
//==========================================================================

#include <ddk.h>

//
// Device Drivers
//

// KTFS
#define DEVICENAME_KTFS            L"ktfsdriver"

EXTERN IDeviceDriver * CDECL CreateKtfs(uint_t uDeviceNo, void *pvParameter);

// Block Flash
#define DEVICENAME_FLASHSTORAGE            L"flashstorage"

EXTERN IDeviceDriver * CDECL CreateBlkFlash(uint_t uDeviceNo, void *pvParameter);

// Flash
#define DEVICENAME_FLASH            L"flash"

EXTERN IDeviceDriver * CDECL CreateFlash(uint_t uDeviceNo, void *pvParameter);

// Console
#define DEVICENAME_CONSOLE          L"console"

EXTERN IDeviceDriver * CDECL CreateConsole(uint_t uDeviceNo, void *pvParameter);

// Boot file list driver
#define DEVICENAME_BOOTMODS         L"bootmods"

EXTERN IDeviceDriver * CDECL CreateBootModules(uint_t uDeviceNo, void *pv);

//slip protocal
#define DEVICENAME_SLIP             L"slip"

EXTERN IDeviceDriver * CDECL CreateSLIP(uint_t uDeviceNo, void *pvParameter);

// Serial
#define DEVICENAME_SERIAL           L"serial"

EXTERN IDeviceDriver * CDECL CreateSerial(uint_t uDeviceNo, void *pvParameter);

//
// Device Configurations
//
// NOTE: the device name can't be more than 31 words
STATIC DECL_DATAINIT DeviceConfig s_deviceConfigs[] = {
    { DEVICENAME_FLASH,             DEVICENO_NONE, NULL },
    { DEVICENAME_CONSOLE,           0, NULL },
    { DEVICENAME_BOOTMODS,          0, NULL },
    { DEVICENAME_SLIP,              DEVICENO_NONE, NULL },
    { DEVICENAME_SERIAL,            1, NULL },
    { DEVICENAME_FLASHSTORAGE,      DEVICENO_NONE, NULL },
    { DEVICENAME_KTFS,              DEVICENO_NONE, NULL }
};

//
// Driver Configurations
//
STATIC DriverConfig s_driverConfigs[] = {
    { DEVICENAME_FLASH,             &CreateFlash },
    { DEVICENAME_CONSOLE,           &CreateConsole },
    { DEVICENAME_BOOTMODS,          &CreateBootModules },
    { DEVICENAME_SLIP,              &CreateSLIP },
    { DEVICENAME_SERIAL,            &CreateSerial },
    { DEVICENAME_FLASHSTORAGE,      &CreateBlkFlash },
    { DEVICENAME_KTFS,              &CreateKtfs }
};

DzConfig dzcfg = {
    s_deviceConfigs,                // *pDeviceConfigs
    lengthof(s_deviceConfigs),      // uNumberOfDeviceConfigs

    s_driverConfigs,                // *pDriverConfigs
    lengthof(s_driverConfigs)       // uNumberOfDriverConfigs
};
